<?
// mcGallery - Marc Cagninacci - marc@phpforums.net - http://www.phpforums.net

function shadow($album, $image, $start)
{
  $photo= 'albums/'.$album.'/small/'.$image;
	if(!is_readable($photo))
	{
		die("?");
	}
	$taille = GetImageSize($photo);
	$html = '<table border="0" cellpadding="0" cellspacing="0">
			<tr>
				<td rowspan="2" colspan="2"><a href="show.php?start='.$start.'&file='.$image.'&album='.$album.'"><img src="'.$photo.'" width="'.$taille[0].'" height="'.$taille[1].'" border="0" alt="go"></a></td>
				<td><img src="images/ombre_1.gif"></td>
			</tr>
			<tr>
				<td><img src="images/ombre_2.gif" height="'.($taille[1]-8).'" width="6"></td>
			</tr>
			<tr>
				<td><img src="images/ombre_3.gif"></td>
				<td><img src="images/ombre_4.gif" height="8" width="'.($taille[0]-7).'"></td>
				<td><img src="images/ombre_5.gif"></td>
			</tr>
		</table>';

	return $html;
}

function shadow2($album, $image, $start)
{
  $photo= 'albums/'.$album.'/'.$image;
	if(!is_readable($photo))
	{
		die("?");
	}
	$taille = GetImageSize($photo);
        if ($taille[0]>640)
	{
         $proportion= ($taille[0]/640);
         $taille[1] = ($taille[1]/$proportion);
         $taille[0] = 640;
        }        

	$html = '<table border="0" cellpadding="0" cellspacing="0">
			<tr>
				<td rowspan="2" colspan="2"><a href="index.php?start='.$start.'&album='.$album.'"><img src="'.$photo.'" width="'.$taille[0].'" height="'.$taille[1].'" border="0" alt="album"></a></td>
				<td><img src="images/ombre_1.gif"></td>
			</tr>
			<tr>
				<td><img src="images/ombre_2.gif" height="'.($taille[1]-8).'" width="6"></td>
			</tr>
			<tr>
				<td><img src="images/ombre_3.gif"></td>
				<td><img src="images/ombre_4.gif" height="8" width="'.($taille[0]-7).'"></td>
				<td><img src="images/ombre_5.gif"></td>
			</tr>
		</table>';

	return $html;
}

?>

